PROJECT(XPMRDF-App)
#add the files to our groups and app
SOURCE_GROUP("app" ./app/*)
#seems to be a bug in cmake, can't put these in analysis\\standard folder :(
#upper detail

SET(XPMRDF-App_Files
    ./app/main.cc
)

#find our headers
file(GLOB_RECURSE HEADERS ${XPMRDF-App_SOURCE_DIR}/*.h)


#create the libraries
INCLUDE_DIRECTORIES( ${XPMRDF_SOURCE_DIR}/src/app 
                     ${XPMRDF_SOURCE_DIR}/src/model
					 ${XPMRDF_SOURCE_DIR}/src/control
					 )

add_executable(XPMRDF-App
	${XPMRDF-App_Files} 
	${HEADERS}
)

TARGET_LINK_LIBRARIES(XPMRDF-App 
                      XPMRDF-Model					  
					  XPMRDF-Control 
					  XPMRDF-Dal					  
					  ${XERCESC_LIBRARY}
					  )

#set properties on the libraries
SET_TARGET_PROPERTIES(XPMRDF-App PROPERTIES
    VERSION ${XPMRDF_VERSION}
    SOVERSION ${XPMRDF_SOVERSION}
    COMPILE_DEFINITIONS_DEBUG _DEBUG
)

if(CMAKE_SYSTEM_NAME MATCHES "Windows")
    if(DEFINED MINGW)
		SET(CMAKE_EXE_LINKER_FLAGS "-mwindows -fopenmp")
	else(DEFINED MINGW)
#	    SET_TARGET_PROPERTIES( XPMDOC-App PROPERTIES COMPILE_FLAGS "${XPMDOC_SOURCE_DIR}/src/dal/dal/db/otlv4.h" )
#        SET_TARGET_PROPERTIES( XPMDOC-App PROPERTIES LINK_FLAGS "odbc32.lib" )
		SET(CMAKE_CXX_FLAGS "/DGLUT_BUILDING_LIB /openmp")
		SET(CMAKE_EXE_LINKER_FLAGS "/subsystem:console /entry:mainCRTStartup")
	endif(DEFINED MINGW)
else(CMAKE_SYSTEM_NAME MATCHES "Windows")
	SET(CMAKE_EXE_LINKER_FLAGS "-fopenmp")
endif(CMAKE_SYSTEM_NAME MATCHES "Windows")





